﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web.Views.Common
{
    public partial class TrainSearch : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                 if (Request.QueryString["StartStation"] != null && Request.QueryString["EndStation"]!=null)
                 {
                     this.Title ="容易订票网  "+HttpUtility.UrlDecode(Request.QueryString["StartStation"].ToString()) + "--" + HttpUtility.UrlDecode(Request.QueryString["EndStation"].ToString());
                 }
          
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["StartStation"] != null && Request.QueryString["EndStation"]!=null)
            {
                Panny.TrainData.TrainStation ts = new Panny.TrainData.TrainStation("ConnectionString");

                ts.SearchByStationName(HttpUtility.UrlDecode(Request.QueryString["StartStation"].ToString()), HttpUtility.UrlDecode(Request.QueryString["EndStation"].ToString()));
                this.gdvTrainStation.DataBind();
            }
        }
       
    }
}
